package com.light.gulimall.ware.dto;

import java.util.Objects;

public class Item {

    /**
     * 采购需求id
     */
    private Long itemId;

    /**
     * 状态
     */
    private Integer status;

    /**
     *  成功/失败原因
     */
    private String reason;


    public Item() {
    }

    public Item(Long itemId, Integer status, String reason) {
        this.itemId = itemId;
        this.status = status;
        this.reason = reason;
    }

    /**
     * 获取
     * @return itemId
     */
    public Long getItemId() {
        return itemId;
    }

    /**
     * 设置
     * @param itemId
     */
    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    /**
     * 获取
     * @return status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置
     * @param status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 获取
     * @return reason
     */
    public String getReason() {
        return reason;
    }

    /**
     * 设置
     * @param reason
     */
    public void setReason(String reason) {
        this.reason = reason;
    }

    public String toString() {
        return "Item{itemId = " + itemId + ", status = " + status + ", reason = " + reason + "}";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Item item = (Item) o;
        return Objects.equals(itemId, item.itemId) && Objects.equals(status, item.status) && Objects.equals(reason, item.reason);
    }

    @Override
    public int hashCode() {
        return Objects.hash(itemId, status, reason);
    }
}
